package sk.marek.barak.client.util;

import de.bea.domingo.DNotesFactory;
import de.bea.domingo.DSession;


public class UserUtility {
	private static DSession session;
	
	static{
		 DNotesFactory factory = DNotesFactory.getInstance();
		 session = factory.getSession();
		
	}
	
	public static String getUserName(){
		
		 String name =  parseUserName(session.getUserName());
		
		 return name;
		 
	}
	private static String parseUserName(String name){
		int first = name.indexOf('=') +1;
		int last = name.indexOf("/");
		return name.substring(first, last);
	}

}
